package com.atguigu.eduservice.client;

import com.atguigu.commonutils.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author : 李红磊
 * @Date : 2021/06/22/16:10
 * @Description :
 */
@FeignClient(name = "service-vod",fallback = VodFileDegradeFeignClient.class )
@Component
public interface VodClient {

    //定义要调用的方法
    //根据视频id删除阿里云视频
    @DeleteMapping("/eduvod/video/removeVideo/{videoId}")
    CommonResult removeVideo(@PathVariable("videoId") String videoId);


    //删除多个阿里云视频方法
    @DeleteMapping("/eduvod/video/removerPatch")
    CommonResult deleteBatch(@RequestParam List<String> videoIdList);

}
